home *** CD-ROM | disk | FTP | other *** search
/ 3D World 110 / 3DW_110.iso / mac / Menu / Scenes / home.dir / 00060_Script_Gallery Generate < prev    next >
Text File  |  2008-09-12  |  1KB  |  46 lines

  1. global gMenuList
  2. global gFullPath
  3. global SectionNumber
  4. global SectionPath
  5. global finalchan
  6.  
  7.  
  8. on exitFrame me
  9.   member("SectionTitle").text = "GALLERY"
  10.   p = gMenuList[SectionNumber]
  11.   SectionPath = p.ItemPath
  12.   li = p.ItemList
  13.   
  14.   lH = 20
  15.   lV = 100
  16.   offs = 20
  17.   myTitle = "GALLERY"
  18.   pline = 1
  19.   
  20.   repeat with i = 1 to the number of members of castlib "SubItems"
  21.     if member(i, "subItems").name contains myTitle then
  22.       channel(finalChan + pLine).removescriptedsprite()
  23.       channel(finalChan + pLine).makescriptedsprite(member(i, "subItems"), point(lH,lV))
  24.       sprite(finalChan + pLine).scriptInstanceList = []
  25.       add(sprite(finalChan + pLine).scriptInstanceList, new(script "gallery_button", 1))    
  26.       _movie.sendSprite(finalChan + pLine, #Initialize, (finalChan + pLine), pLine)
  27.       sprite(finalChan + pLine).ink = 36
  28.       lV = lV + 20
  29.       if pLine = 1 then
  30.         pSp = finalChan + pLine
  31.         pnum = pLine
  32.       end if
  33.       
  34.       pLine = pLine + 1
  35.     end if
  36.   end repeat
  37.   
  38.   aPath = gMenuList[SectionNumber].itemList[pnum].itemPath
  39.   
  40.   sendsprite(pSp, #GenerateGallery, apath)
  41.   
  42.   
  43.   
  44.   
  45.   
  46. end